﻿<cfsilent>
	<cfscript>
		
		event.setArg("pageTitle", "教师门户 - 网上成绩提交 - 课程补考成绩提交向导");
		
		sessionAdvice = getProperty("serviceFactory").getBean("sessionAdvice");
		
		teacherId = sessionAdvice.getAutherUserID();
		
		hashCode = event.getArg("Sign");
		taskId = event.getArg("TSK");
		taskType = event.getArg("TT");
		
		checked = false;
				
		try {
			
			if ( decrypt(hashCode, teacherId, "PBEWithMD5AndDES", "Hex") eq taskId ) {
				
				checked = true;
				
				/* 载入补考教学任务 */
				sql = "SELECT c.cat_name,
							   b.course_name 
						FROM t_resitplan a
							 INNER JOIN t_course b ON a.cid=b.cid 
							 INNER JOIN t_course_catalog c ON b.cat_id = c.cat_id
	 					WHERE a.task_id=:taskId ";
						
				queryObj = new Query( datasource=application.dnsSlave ); 
				
				queryObj.addParam( name="taskId", value=taskId, cfsqltype="cf_sql_varchar" );
				
				rs_task = queryObj.execute( sql=sql ).getResult();
				
				
			}
			
		}
		catch (any ecpt) {
		}

	</cfscript>
</cfsilent>

<cfif checked >

		<div id="headArea">
			<div class="uiHeader uiHeaderWithImage ptm">
				<div class="clearfix uiHeaderTop">
					<div class="uiHeaderActions rfloat">
						<a class="uiButton" href="<cfoutput>#buildURL('taskMarkResit')#</cfoutput>"><i class="mrs img btnPublish"></i><span class="uiButtonText">课程补考成绩</span></a>
					</div>
					<div>
						<h2 class="uiHeaderTitle">
							<i class="uiHeaderImage img icon16x16 application"></i><cfoutput>#rs_task.course_name#</cfoutput> - <cfoutput>#rs_task.cat_name#</cfoutput>
						</h2>
					</div>
				</div>
			</div>
		</div>
		
		<div class="UIElement">
			<ul class="senateFirstPage">
				<li>
					<div class="clearfix" id="summary">
						
						<!--- stepMenu --->
						<cfoutput>#event.getArg("stepMenu")#</cfoutput>
						<!--- /stepMenu --->

						<!--- wizardContent --->
						<cfoutput>#event.getArg("wizardContent")#</cfoutput>
						<!--- /wizardContent --->
						
					</div>
				</li>
			</ul>
		</div>
	
	<cfelse>
		
		<div id="headArea">
			<div class="uiHeader uiHeaderWithImage ptm">
				<div class="clearfix uiHeaderTop">
					<div class="uiHeaderActions rfloat">
						<a class="uiButton" href="<cfoutput>#buildURL('taskMarkResit')#</cfoutput>"><i class="mrs img btnPublish"></i><span class="uiButtonText">课程补考成绩</span></a>
					</div>
					<div>
						<h2 class="uiHeaderTitle">
							<i class="uiHeaderImage img icon16x16 info"></i>身份验证失败
						</h2>
					</div>
				</div>
			</div>
		</div>
		
		<div class="UIElement">
			<ul class="senateFirstPage">
				<li>
					<div class="clearfix" id="summary">
						
						<div class="systemNotice">
							<h3><span class="img icon16x16 message"></span>错误的参数</h3>
							<p>请关闭浏览器重新登录 或 检查您是否使用了正确访问方式</p>
						</div>
						
					</div>
				</li>
			</ul>
		</div>
</cfif>